package com.lgj.web.sys.controller;

import com.lgj.result.ResultBody;
import com.lgj.web.proxy.BusinessServerProxy;
import com.lgj.web.sys.service.TransactionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/tra")
public class TransactionController {
    @Autowired
    private TransactionService transactionService;

    @Autowired
    private BusinessServerProxy businessServerProxy;

    @GetMapping("/test")
    public ResultBody test(){
        try {
            businessServerProxy.test();
            transactionService.test();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return ResultBody.success();
    }
}
